{% extends "base.html" %}
{% load i18n %}

{% block title %}{% trans "退出登录" %}{% endblock %}

{% block content %}
<div class="container py-5">
  <div class="row justify-content-center">
    <div class="col-md-6">
      <div class="card shadow">
        <div class="card-header bg-primary text-white">
          <h1 class="h4 mb-0">{% trans "退出登录" %}</h1>
        </div>
        <div class="card-body">
          <p>{% trans '您确定要退出登录吗?' %}</p>

          <form method="post" action="{% url 'account_logout' %}">
            {% csrf_token %}
            {% if redirect_field_value %}
            <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
            {% endif %}
            <div class="d-flex justify-content-between mt-3">
              <a href="{% url 'home' %}" class="btn btn-secondary">{% trans "取消" %}</a>
              <button type="submit" class="btn btn-primary">{% trans "确认退出" %}</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}

